#ifndef _MISC_STEG
#define  _MISC_STEG
#include<dos.h>
#include<dir.h>

/* Keys */
#define EXT    300
#define ALT_F  33+EXT
#define ALT_X  45+EXT
#define ALT_S  31+EXT

#define ALT_E  18+EXT
#define ALT_D  32+EXT
#define ALT_H  35+EXT
#define ALT_Q  16+EXT
#define UP     72+EXT
#define DOWN   80+EXT
#define LEFT   75+EXT
#define RIGHT  77+EXT
#define ESC    27
#define ENTER  13
#define TAB    9


/****************************************************************************
 *  Name       : fileExists
 *  Parameters : Filename
 *  Returns    : Success (1 if file exists and 0 if does not exist)
 *  Purpose    : To check if a certain file exists or not.
 ****************************************************************************/
int fileExists(char *filename)
{
	int status;
	status = access(filename, 0); // Check if file exists
	return ((status == 0) ? 1 : 0);
}

/****************************************************************************
 *  Name       : getKey
 *  Parameters : None
 *  Returns    : Integer containing the ASCII value of the keypress.
 *  Purpose    : To get the ASCII value when a key is pressed.	If a
 *               special key like F1 is pressed ASCII value + 300 is returned
 *               so as to distinguish from a normal keypress.
 ****************************************************************************/
inline int getKey()
{
	int c;
	c = ((c = getch()) == 0) ? (getch() + 300) : c;
	return c;
}

#endif